<template>
  <el-container class="height100 domain weixinAdmin">
    <el-header class="obpm-header-t" ref="top1" height="90px">
      <admin_header
        :detail="detail"
        :desc="$t('enterprise_list')"
        :isCanExit="isCanExit"
        :showPartMenu="!showPartMenu"
      />
    </el-header>
    <el-container style="overflow: hidden">
      <el-aside width="210px">
        <div class="menulist">
          <el-menu >
            <div class="el-submenu">
              <el-menu-item-group>
                <el-menu-item index="ApplicationInfo" @click="handleClick('app')">
                  <i class="fa fa-info-circle" aria-hidden="true"></i>
                  <span class="marginL10">应用管理</span>
                </el-menu-item>
                <el-menu-item index="LabelInfo" @click="handleClick('label')">
                  <i class="fa fa-fw fa-tags" aria-hidden="true"></i>
                  <span class="marginL10">标签管理</span>
                </el-menu-item>
                <el-menu-item index="MediasInfo" @click="handleClick('medias')">
                  <i class="fa fa-info-circle" aria-hidden="true"></i>
                  <span class="marginL10">素材管理</span>
                </el-menu-item>
              </el-menu-item-group>
            </div>
          </el-menu>
        </div>
      </el-aside>
      <el-main ref="tabCon" class="domainMain"> 
        <application_management v-if="meunList.isApp"></application_management>  
        <label_management v-if="meunList.isLabel"></label_management>  
        <medias_management v-if="meunList.isMedias"></medias_management>  
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
import admin_header from "@/components/admin_header.vue";
import application_management from "@/components/application_management.vue";
import label_management from "@/components/label_management.vue";
import medias_management from "@/components/medias_management.vue";
export default {
  name: "",
  components: {
    admin_header,
    application_management,
    label_management,
    medias_management,
  },
  data() {
    return {
      openeds: ['company'],
      detail: '', // 当前选中的是哪个页签
      showPartMenu: false, // 显示部分菜单
      isCanExit:true,
      meunList: {
        isApp: true,
        isLabel: false,
        isMedias: false,
      }
    };
  },
  created(){
  },
  methods: {
    handleClick(value){
      this.hiddenMenuList();
      switch(value) {
        case "app":
          this.meunList.isApp = true;
          break;
        case "label":
          this.meunList.isLabel = true;
          break;
        case "medias": 
          this.meunList.isMedias = true;
          break;
      }
    },
    hiddenMenuList(){
      for(let key in this.meunList){
        this.meunList[key] = false;
      }
    }
  },
};
</script>

<style lang='scss' scoped>
.domain{
  .el-menu{
    border: none;
  }
  .el-menu-item {
    padding-left: 40px !important;
  }
}
</style>
